package org.projetjava.presentation;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;

import javax.swing.JPanel;

public class ImageSlider extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Image image = null;
	
	public Image getImage() {
		return image;
	}



	public void setImage(Image image) {
		this.image = image;
	}



	public ImageSlider()
	{
		this.setSize(300, 100);
		this.setMinimumSize(new Dimension(300, 150));
		this.setPreferredSize(new Dimension(300, 150));
		this.setMaximumSize(new Dimension(300, 150));
	}
	
	
	
	protected void paintComponent(Graphics g) {
        if(image != null)
        {
        	g.drawImage(image, 75, 0, 150, 150, this);
        }
        
    }
	
	public void attribuerImage(Image img)
	{
		image = img;
	}

}
